package com.real8.plusplayground.client.activity;

import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceTokenizer;
import com.google.gwt.place.shared.Prefix;

/**
 * The place in the application that shows an Activity
 * 
 * @author Rutger van der Eijk
 * 
 */
public class ActivityReadPlace extends Place {
	private String activityId;

	public ActivityReadPlace(String token) {
		activityId = token;
	}

	public String getActivityId() {
		return activityId;
	}

	@Prefix("ar")
	public static class Tokenizer implements PlaceTokenizer<ActivityReadPlace> {
		@Override
		public ActivityReadPlace getPlace(String token) {
			return new ActivityReadPlace(token);
		}

		@Override
		public String getToken(ActivityReadPlace place) {
			return place.getActivityId();
		}
	}
}
